<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <f:facet name="first">
            <meta http-equiv="X-UA-Compatible" content="IE=edge" />
            <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
            <meta name="viewport" content="width=device-width, initial-scale=1" />        

            <title>primestrap</title>
        </f:facet>

        <f:facet name="middle">
            <h:outputStylesheet name="../resources/css/bootstrap.css" />
        
            <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" />
            <script src="../resources/js/bootstrap.js" type="text/javascript"></script>            <h:outputScript name="../resources/js/bootstrap.js" />
        </f:facet>

        <f:facet name="last">

        </f:facet>
    </h:head>
    <body style="background-color: graytext;">
        <h:form id="idForm" styleClass="form-group">
            <p:fieldset legend="Dados Gerais">
                <h:panelGrid id="idGridDadosGerais" columns="1">
                    <h:panelGroup>
                        <p:outputLabel id="idNomeFantasia" value="Nome Fantasia: " />
                        <br/><p:inputText  id="idNomeFantasia" size="60" maxlength="255" required="true" styleClass="form-control" ></p:inputText>
                        <p:commandButton value="Buscar" update="idForm"/>
                    </h:panelGroup>   
                    <h:panelGroup>
                        <p:outputLabel  for="idRazaoSocial" value="Razão Social: "/>
                        <br/><p:inputText id="idRazaoSocial" size="60" maxlength="255"></p:inputText>
                    </h:panelGroup>
                    <h:panelGroup>
                        <p:outputLabel  for="idDocumento" value="CNPJ / CPF: "/>
                        <br/><p:inputMask id="idDocumento" mask="999.999.999-99" maxlength="14"/>
                    </h:panelGroup>
                    <h:panelGroup>
                        <p:outputLabel  for="idInscricaoEtadual" value="Inscrição Estadual: "/>
                        <br/><p:inputMask id="idInscricaoEtadual" mask="99999999999" maxlength="11"/>
                    </h:panelGroup>
                </h:panelGrid>
            </p:fieldset>

            <p:fieldset legend="Endereço">
                <h:panelGrid id="idGridEndereco" columns="1">
                    <h:panelGroup>
                        <p:outputLabel  for="idCep" value="CEP: " />
                        <br/><p:inputMask id="idCep" mask="99.999-999" required="true"/>
                    </h:panelGroup>
                    <h:panelGroup>
                        <p:outputLabel for="idLogradouro" value="Logradouro: "/>
                        <br/><p:inputText id="idLogradouro" size="60" maxlength="255"></p:inputText>
                    </h:panelGroup>   
                    <h:panelGroup>
                        <p:outputLabel  for="idNumero" value="Número: "/>
                        <br/><p:inputText id="idNumero" maxlength="9"></p:inputText>
                    </h:panelGroup>
                    <h:panelGroup>
                        <p:outputLabel  for="idBairro" value="Bairro: "/>
                        <br/><p:inputText id="idBairro" maxlength="50"></p:inputText>
                    </h:panelGroup>
                    <h:panelGroup>
                        <p:outputLabel  for="idComplemento" value="Complemento: "/>
                        <br/><p:inputText id="idComplemento" size="60" maxlength="255"></p:inputText>
                    </h:panelGroup>
                    <h:panelGroup>
                        <p:outputLabel  for="idUF" value="UF: "/>
                        <br>
                            <p:selectOneMenu id="idUF" onkeydown="#{manterClienteSessionBean.collCidade}">
                                <f:selectItems value="#{manterClienteSessionBean.collUf}"/>
                            </p:selectOneMenu>
                        </br>
                    </h:panelGroup>
                    <h:panelGroup>
                        <p:outputLabel  for="idCidade" value="Cidade: "/>
                        <br/><p:inputText id="idCidade" maxlength="50"></p:inputText>
                    </h:panelGroup>
                </h:panelGrid>
            </p:fieldset>

            <p:fieldset legend="Contato">
                <h:panelGrid id="idGridContato" columns="1">
                    <h:panelGroup>
                        <p:outputLabel for="idNome" value="Nome: "/>
                        <br/><p:inputText id="idNome" size="60" maxlength="255"></p:inputText>
                    </h:panelGroup>   
                    <h:panelGroup>
                        <p:outputLabel  for="idTelefone" value="Telefone: "/>
                        <br/><p:inputMask id="idTelefone" mask="(99)9999-9999"/>
                    </h:panelGroup>
                    <h:panelGroup>
                        <p:outputLabel  for="idFax" value="Fax: "/>
                        <br/><p:inputMask id="idFax" mask="(99)9999-9999"/>
                    </h:panelGroup>
                    <h:panelGroup>
                        <p:outputLabel  for="idEMail" value="E-Mail: "/>
                        <br/><p:inputText type="email" id="idEMail" size="60" maxlength="255"></p:inputText>
                    </h:panelGroup>
                </h:panelGrid>
            </p:fieldset>

            <p:fieldset legend="Dados para Listagem">
                <h:panelGrid id="idGridListagem" columns="1">
                    <h:panelGroup>
                        <p:outputLabel  for="idTelefone" value="Telefone: "/>
                        <br/><p:inputMask id="idTelefone" mask="(99)9999-9999"/>
                    </h:panelGroup>
                    <h:panelGroup>
                        <p:outputLabel  for="idFax" value="Fax: "/>
                        <br/><p:inputMask id="idFax" mask="(99)9999-9999"/>
                    </h:panelGroup>
                    <h:panelGroup>
                        <p:outputLabel  for="idEMail" value="E-Mail: "/>
                        <br/><p:inputText type="email" id="idEMail" size="60" maxlength="255"></p:inputText>
                    </h:panelGroup>
                    <h:panelGroup>
                        <p:outputLabel  for="idWebsite" value="Website: "/>
                        <br/><p:inputText id="idWebsite" size="60" maxlength="255"></p:inputText>
                    </h:panelGroup>
                    <h:panelGroup>
                        <p:commandButton value="+" update="idMaisDadosListagemPanel"/>
                    </h:panelGroup>   
                </h:panelGrid>
                <p:panel id="idMaisDadosListagemPanel" rendered="false"></p:panel>
            </p:fieldset>

            <p:fieldset legend="Anuncio">
                <h:panelGrid id="idGridAnuncio" columns="1">
                    <h:panelGroup>
                        <p:outputLabel for="idSelecionar" value="Selecionar Plano: "/>
                        <br/><p:selectOneMenu id="idSelecionar">
                            <f:selectItem itemLabel="Option 1" itemValue="Option 1" />  
                            <f:selectItem itemLabel="Option 2" itemValue="Option 2" />  
                            <f:selectItem itemLabel="Option 3" itemValue="Option 3" />  
                        </p:selectOneMenu>
                    </h:panelGroup>  
                    <h:panelGroup>
                        <p:outputLabel for="idDataInicio" value="Data Inicial: "/>
                        <br/><p:calendar id="idDataInicio" ></p:calendar>
                    </h:panelGroup>   
                    <h:panelGroup>
                        <p:outputLabel for="idDataFim" value="Data Final: "/>
                        <br/><p:calendar id="idDataFim" ></p:calendar>
                    </h:panelGroup>
                    <h:panelGroup>
                        <p:outputLabel  for="idImagem" value="Imagem: "/>
                        <br/><p:inputText id="idImagem"></p:inputText>
                        <p:button value="Upload" />
                    </h:panelGroup>
                    <h:panelGroup>
                        <p:commandButton value="+" update="idMaisDadosListagemPanel"/>
                    </h:panelGroup>
                </h:panelGrid>
            </p:fieldset>
        </h:form>
    </body>
</html>

